package nc.bs.hr.utli;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class ListUtli {
	public static Map<String, ArrayList<String>> compareList(List<String> a,List<String> b){
		HashMap<String, String> mapa=new HashMap<String, String>();
		for (String stringa : a) {
			mapa.put(stringa, "0");
		}
        ArrayList<String> addList = new ArrayList<String>();
        ArrayList<String> updateList = new ArrayList<String>();
        Map<String,ArrayList<String>> mapdate = new HashMap<String,ArrayList<String>>();
		for (String string : b) {
			if (mapa.get(string)==null) {
				addList.add(string);
			}else {
				updateList.add(string);
			}
		}
		
		
		mapdate.put("add", addList);
		mapdate.put("update", addList);
		return mapdate;
	}
}
